package com.stars.empoly.adapter


import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.qmuiteam.qmui.kotlin.onClick
import com.stars.empoly.R
import com.stars.empoly.databinding.ItemInvoiceOrderBinding
import com.stars.empoly.model.CompreBean
import com.stars.empoly.vmodel.InvoiceOrderVModel
import com.trailer.base.base.BAdapter

class InvoiceOrderAdapter(var vm: InvoiceOrderVModel) : BAdapter<CompreBean, BaseDataBindingHolder<ItemInvoiceOrderBinding>>(R.layout.item_invoice_order) {

    override fun convert(holder: BaseDataBindingHolder<ItemInvoiceOrderBinding>, item: CompreBean) {
        holder.dataBinding?.vm=vm
        holder.dataBinding?.item = item
        holder.dataBinding?.ll?.onClick {
            item.chose = !item.chose
            notifyItemChanged(holder.adapterPosition)
        }

    }
}
